package org.gwtlive.pointwork.workrequest.client;

import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.core.client.GWT;

import java.util.List;

/**
 * User: fm-sun
 * Date: 2006/07/18
 * Time: 18:14:02
 */
public interface PublishedWorkService extends RemoteService {
    /**
     * Utility/Convinience class.
     * Use PublishedWorkService.App.getInstance() to access static instance of PublishedWorkServiceAsync
     */
    public static class App {
        private static PublishedWorkServiceAsync ourInstance = null;

        public static synchronized PublishedWorkServiceAsync getInstance() {
            if (ourInstance == null) {
                ourInstance = (PublishedWorkServiceAsync) GWT.create(PublishedWorkService.class);
                ((ServiceDefTarget) ourInstance).setServiceEntryPoint("/org.gwtlive.pointwork.workrequest.WorkRequest/PublishedWorkService");
            }
            return ourInstance;
        }
    }

    public List listPublishedWBS();
}
